package Test;

import org.zeromq.ZMQ;

public class JeroRep {
    public static void main(String[] args) throws InterruptedException {
        ZMQ.Context zmp = ZMQ.context(1);

        ZMQ.Socket rep = zmp.socket(ZMQ.REP);

        rep.bind("tcp://localhost:5555");

        int i = 0;

        while (true){
            byte[] recv = rep.recv();
            //System.out.println(recv);

            Thread.sleep(500);

            rep.send("" + i);
            i++;

        }
    }
}
